package com.ficus.road.maintain.core.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public enum HitStatusEnum {
    /* 发现　*/
    NEW("NEW"),
    /* 已推送　*/
    SEND("SEND"),
    /* 未派单 */
    UNDISPATCH("UNDISPATCH"),
    /* 已派单　*/
    DISPATCHED("DISPATCHED"),
    /* 处理中 */
    PROCESSING("PROCESSING"),
    /* 延期待批复 */
    POSTPONE("POSTPONE"),
    /* 已处置　*/
    COMPLETE("COMPLETE"),
    /* 已处置(退单)*/
    REJECTED("REJECTED"),
    /* 复核未通过 */
    CONFIRMFAILED("CONFIRMFAILED"),
    /* 复核通过 */
    CONFIRMED("CONFIRMED"),
    /* 已提醒 */
    NOTED("NOTED"),

    /*  未生成订单 */
    UNGENERATE("UNGENERATE");

    private String value;

    HitStatusEnum(String value) {
        this.value = value;
    }

    @JsonCreator
    public static HitStatusEnum fromValue(String value) {
        for (HitStatusEnum b : HitStatusEnum.values()) {
            if (b.value.equals(value)) {
                return b;
            }
        }
        throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }

    @Override
    @JsonValue
    public String toString() {
        return String.valueOf(value);
    }
}
